﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <title>Led: src/main/java/com/stateforge/statemachine/examples/Led/Led.java Source File</title>
    <link href="/Content/Help.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/tabs.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div id="header">
        <img id="logo" alt="StateForge" src="/Content/Images/StateForgeLogo.png" />
        <div id="title">
            <h1>
                Examples using state machines generated by StateBuilderJava
            </h1>
            <h3>
                Led: src/main/java/com/stateforge/statemachine/examples/Led/Led.java Source File
            </h3>
        </div>
        <div id="menucontainer">
            <ul id="menu">
                <li><a href="/">Home</a></li>
                <li><a href="/Home/Download">Downloads</a></li>
                <li><a href="/Help/state-machine-tools.aspx">Help</a></li>
                <li><a href="/Home/Faq">F.A.Q</a></li>
                <li><a href="/Home/About">Contact us</a></li>
            </ul>
        </div>
    </div>
<!-- Generated by Doxygen 1.7.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">src/main/java/com/stateforge/statemachine/examples/Led/Led.java</div>  </div>
</div>
<div class="contents">
<a href="_led_8java.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a><a class="code" href="namespacecom_1_1stateforge_1_1statemachine_1_1examples_1_1_led.html">00001</a> <span class="keyword">package </span>com.stateforge.statemachine.examples.Led;
<a name="l00002"></a>00002 
<a name="l00006"></a><a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1_led_1_1_led.html">00006</a> <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1_led_1_1_led.html">Led</a>
<a name="l00007"></a>00007 {
<a name="l00008"></a><a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1_led_1_1_led.html#a6018a9442ab196a5f5f352067c790fc5">00008</a>     <span class="keyword">private</span> LedContext <a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1_led_1_1_led.html#a6018a9442ab196a5f5f352067c790fc5">context</a>;
<a name="l00009"></a>00009 
<a name="l00010"></a><a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1_led_1_1_led.html#a72479288954d5dfa019b0890d050aa99">00010</a>     <span class="keyword">public</span> <a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1_led_1_1_led.html#a72479288954d5dfa019b0890d050aa99">Led</a>(){
<a name="l00011"></a>00011         this.<a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1_led_1_1_led.html#a6018a9442ab196a5f5f352067c790fc5">context</a> = <span class="keyword">new</span> LedContext(<span class="keyword">this</span>);
<a name="l00012"></a>00012     }
<a name="l00013"></a>00013 
<a name="l00014"></a><a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1_led_1_1_led.html#a8816038118d06548e4a278d5222683c2">00014</a>     <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1_led_1_1_led.html#a8816038118d06548e4a278d5222683c2">on</a>(){
<a name="l00015"></a>00015         this.<a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1_led_1_1_led.html#a6018a9442ab196a5f5f352067c790fc5">context</a>.on();
<a name="l00016"></a>00016     }
<a name="l00017"></a>00017 
<a name="l00018"></a><a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1_led_1_1_led.html#afc062a83a833d883d8cff3ea60963a1e">00018</a>     <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1_led_1_1_led.html#afc062a83a833d883d8cff3ea60963a1e">off</a>(){
<a name="l00019"></a>00019         this.<a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1_led_1_1_led.html#a6018a9442ab196a5f5f352067c790fc5">context</a>.off();
<a name="l00020"></a>00020     }
<a name="l00021"></a>00021 
<a name="l00022"></a><a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1_led_1_1_led.html#a4d5f2973aa7922f0af1c41e42cdfc4cb">00022</a>     <span class="keywordtype">void</span> <a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1_led_1_1_led.html#a4d5f2973aa7922f0af1c41e42cdfc4cb">doOn</a>(){
<a name="l00023"></a>00023         System.out.println(<span class="stringliteral">&quot;Led.doOn&quot;</span>);
<a name="l00024"></a>00024     }
<a name="l00025"></a>00025 
<a name="l00026"></a><a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1_led_1_1_led.html#a51a9c93ba5203597d12a09b57007a0dc">00026</a>     <span class="keywordtype">void</span> <a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1_led_1_1_led.html#a51a9c93ba5203597d12a09b57007a0dc">doOff</a>(){
<a name="l00027"></a>00027         System.out.println(<span class="stringliteral">&quot;Led.doOff&quot;</span>);
<a name="l00028"></a>00028     }
<a name="l00029"></a>00029     
<a name="l00030"></a><a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1_led_1_1_led.html#a9e7525e83e33f24421500710c7295db5">00030</a>     <span class="keyword">public</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classcom_1_1stateforge_1_1statemachine_1_1examples_1_1_led_1_1_led.html#a9e7525e83e33f24421500710c7295db5">main</a>( String[] args )
<a name="l00031"></a>00031     {
<a name="l00032"></a>00032         System.out.println(<span class="stringliteral">&quot;Led&quot;</span>);
<a name="l00033"></a>00033     }
<a name="l00034"></a>00034 }
</pre></div></div>
</div>
﻿<div id="footer">
    <hr />
    <p>
        Copyright &copy; 2011 StateForge.</p>
    <hr />
</div>
</body> </html> 
